package com.x.dao;

import java.util.List;

import org.hibernate.Criteria;
import org.springframework.stereotype.Component;

import com.x.model.Role;

@Component
public class RoleDAO extends BaseDAO {

	public List<Role> list() {
		Criteria criteria = this.getSession().createCriteria(Role.class);
		return criteria.list();
	}

	public Role getById(String roleId) {
		return (Role) this.getSession().get(Role.class, roleId);
	}

}
